package com.the4man.framework.model.gen;

import java.util.ArrayList;
import java.util.List;

/**
 * Created by lenovo on 2017/12/11.
 */
public class EmployeeBedExampleBase {
    protected String orderByClause;
    protected boolean distinct;
    protected List<Criteria> oredCriteria = new ArrayList();
    protected int limitStart = -1;
    protected int rowsPerPage = -1;

    public EmployeeBedExampleBase() {
    }

    public void setOrderByClause(String orderByClause) {
        this.orderByClause = orderByClause;
    }

    public String getOrderByClause() {
        return this.orderByClause;
    }

    public void setDistinct(boolean distinct) {
        this.distinct = distinct;
    }

    public boolean isDistinct() {
        return this.distinct;
    }

    public List<EmployeeBedExampleBase.Criteria> getOredCriteria() {
        return this.oredCriteria;
    }

    public void or(EmployeeBedExampleBase.Criteria criteria) {
        this.oredCriteria.add(criteria);
    }

    public EmployeeBedExampleBase.Criteria or() {
        EmployeeBedExampleBase.Criteria criteria = this.createCriteriaInternal();
        this.oredCriteria.add(criteria);
        return criteria;
    }

    public EmployeeBedExampleBase.Criteria createCriteria() {
        EmployeeBedExampleBase.Criteria criteria = this.createCriteriaInternal();
        if(this.oredCriteria.size() == 0) {
            this.oredCriteria.add(criteria);
        }

        return criteria;
    }

    protected EmployeeBedExampleBase.Criteria createCriteriaInternal() {
        EmployeeBedExampleBase.Criteria criteria = new EmployeeBedExampleBase.Criteria();
        return criteria;
    }

    public void clear() {
        this.oredCriteria.clear();
        this.orderByClause = null;
        this.distinct = false;
    }

    public void setLimitStart(int limitStart) {
        this.limitStart = limitStart;
    }

    public int getLimitStart() {
        return this.limitStart;
    }

    public void setRowsPerPage(int rowsPerPage) {
        this.rowsPerPage = rowsPerPage;
    }

    public int getRowsPerPage() {
        return this.rowsPerPage;
    }

    public static class Criteria extends EmployeeBedExampleBase.GeneratedCriteria {
        protected Criteria() {
        }
    }

    public static class Criterion {
        private String condition;
        private Object value;
        private Object secondValue;
        private boolean noValue;
        private boolean singleValue;
        private boolean betweenValue;
        private boolean listValue;
        private String typeHandler;

        public String getCondition() {
            return this.condition;
        }

        public Object getValue() {
            return this.value;
        }

        public Object getSecondValue() {
            return this.secondValue;
        }

        public boolean isNoValue() {
            return this.noValue;
        }

        public boolean isSingleValue() {
            return this.singleValue;
        }

        public boolean isBetweenValue() {
            return this.betweenValue;
        }

        public boolean isListValue() {
            return this.listValue;
        }

        public String getTypeHandler() {
            return this.typeHandler;
        }

        protected Criterion(String condition) {
            this.condition = condition;
            this.typeHandler = null;
            this.noValue = true;
        }

        protected Criterion(String condition, Object value, String typeHandler) {
            this.condition = condition;
            this.value = value;
            this.typeHandler = typeHandler;
            if(value instanceof List) {
                this.listValue = true;
            } else {
                this.singleValue = true;
            }

        }

        protected Criterion(String condition, Object value) {
            this(condition, value, (String)null);
        }

        protected Criterion(String condition, Object value, Object secondValue, String typeHandler) {
            this.condition = condition;
            this.value = value;
            this.secondValue = secondValue;
            this.typeHandler = typeHandler;
            this.betweenValue = true;
        }

        protected Criterion(String condition, Object value, Object secondValue) {
            this(condition, value, secondValue, (String)null);
        }
    }

    protected abstract static class GeneratedCriteria {
        protected List<EmployeeBedExampleBase.Criterion> criteria = new ArrayList();

        protected GeneratedCriteria() {
        }

        public boolean isValid() {
            return this.criteria.size() > 0;
        }

        public List<EmployeeBedExampleBase.Criterion> getAllCriteria() {
            return this.criteria;
        }

        public List<EmployeeBedExampleBase.Criterion> getCriteria() {
            return this.criteria;
        }

        protected void addCriterion(String condition) {
            if(condition == null) {
                throw new RuntimeException("Value for condition cannot be null");
            } else {
                this.criteria.add(new EmployeeBedExampleBase.Criterion(condition));
            }
        }

        protected void addCriterion(String condition, Object value, String property) {
            if(value == null) {
                throw new RuntimeException("Value for " + property + " cannot be null");
            } else {
                this.criteria.add(new EmployeeBedExampleBase.Criterion(condition, value));
            }
        }

        protected void addCriterion(String condition, Object value1, Object value2, String property) {
            if(value1 != null && value2 != null) {
                this.criteria.add(new EmployeeBedExampleBase.Criterion(condition, value1, value2));
            } else {
                throw new RuntimeException("Between values for " + property + " cannot be null");
            }
        }

        public EmployeeBedExampleBase.Criteria andIdIsNull() {
            this.addCriterion("id is null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdIsNotNull() {
            this.addCriterion("id is not null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdEqualTo(String value) {
            this.addCriterion("id =", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdNotEqualTo(String value) {
            this.addCriterion("id <>", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdGreaterThan(String value) {
            this.addCriterion("id >", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdGreaterThanOrEqualTo(String value) {
            this.addCriterion("id >=", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdLessThan(String value) {
            this.addCriterion("id <", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdLessThanOrEqualTo(String value) {
            this.addCriterion("id <=", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdLike(String value) {
            this.addCriterion("id like", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdNotLike(String value) {
            this.addCriterion("id not like", value, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdIn(List<String> values) {
            this.addCriterion("id in", values, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdNotIn(List<String> values) {
            this.addCriterion("id not in", values, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdBetween(String value1, String value2) {
            this.addCriterion("id between", value1, value2, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andIdNotBetween(String value1, String value2) {
            this.addCriterion("id not between", value1, value2, "id");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdIsNull() {
            this.addCriterion("emp_id is null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdIsNotNull() {
            this.addCriterion("emp_id is not null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdEqualTo(String value) {
            this.addCriterion("emp_id =", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdNotEqualTo(String value) {
            this.addCriterion("emp_id <>", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdGreaterThan(String value) {
            this.addCriterion("emp_id >", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdGreaterThanOrEqualTo(String value) {
            this.addCriterion("emp_id >=", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdLessThan(String value) {
            this.addCriterion("emp_id <", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdLessThanOrEqualTo(String value) {
            this.addCriterion("emp_id <=", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdLike(String value) {
            this.addCriterion("emp_id like", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdNotLike(String value) {
            this.addCriterion("emp_id not like", value, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdIn(List<String> values) {
            this.addCriterion("emp_id in", values, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdNotIn(List<String> values) {
            this.addCriterion("emp_id not in", values, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdBetween(String value1, String value2) {
            this.addCriterion("emp_id between", value1, value2, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andEmpIdNotBetween(String value1, String value2) {
            this.addCriterion("emp_id not between", value1, value2, "empId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdIsNull() {
            this.addCriterion("room_id is null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdIsNotNull() {
            this.addCriterion("room_id is not null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdEqualTo(String value) {
            this.addCriterion("room_id =", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdNotEqualTo(String value) {
            this.addCriterion("room_id <>", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdGreaterThan(String value) {
            this.addCriterion("room_id >", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdGreaterThanOrEqualTo(String value) {
            this.addCriterion("room_id >=", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdLessThan(String value) {
            this.addCriterion("room_id <", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdLessThanOrEqualTo(String value) {
            this.addCriterion("room_id <=", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdLike(String value) {
            this.addCriterion("room_id like", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdNotLike(String value) {
            this.addCriterion("room_id not like", value, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdIn(List<String> values) {
            this.addCriterion("room_id in", values, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdNotIn(List<String> values) {
            this.addCriterion("room_id not in", values, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdBetween(String value1, String value2) {
            this.addCriterion("room_id between", value1, value2, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andRoomIdNotBetween(String value1, String value2) {
            this.addCriterion("room_id not between", value1, value2, "roomId");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoIsNull() {
            this.addCriterion("bed_no is null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoIsNotNull() {
            this.addCriterion("bed_no is not null");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoEqualTo(String value) {
            this.addCriterion("bed_no =", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoNotEqualTo(String value) {
            this.addCriterion("bed_no <>", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoGreaterThan(String value) {
            this.addCriterion("bed_no >", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoGreaterThanOrEqualTo(String value) {
            this.addCriterion("bed_no >=", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoLessThan(String value) {
            this.addCriterion("bed_no <", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoLessThanOrEqualTo(String value) {
            this.addCriterion("bed_no <=", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoLike(String value) {
            this.addCriterion("bed_no like", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoNotLike(String value) {
            this.addCriterion("bed_no not like", value, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoIn(List<String> values) {
            this.addCriterion("bed_no in", values, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoNotIn(List<String> values) {
            this.addCriterion("bed_no not in", values, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoBetween(String value1, String value2) {
            this.addCriterion("bed_no between", value1, value2, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }

        public EmployeeBedExampleBase.Criteria andBedNoNotBetween(String value1, String value2) {
            this.addCriterion("bed_no not between", value1, value2, "bedNo");
            return (EmployeeBedExampleBase.Criteria)this;
        }
    }
}
